# coding:utf-8

# print('Hello World!')

"""
    多行注释
    哈哈哈
"""
import my_utils.str_util
# money = 50
# print('money =', money)
# money = money - 10
# print('money =', money)
# money = '五十'
# print('money：', money)

# print(type('heima'))
# print(type(123))
# print(type(13.14))

# money = 50
# print(type(money))
# money = '50'
# print(type(money))

# if True:
#     print('True')
# else:
#     print('False')
#
# money = 50
# money = money * 2
# print('money:', money)

# name = 'chenhao'
# age = 40
# message = 'My name is %s, I\'m %s years old.' % (name, age)
# print(message)

# name = 'itcast'
# set_up_year = 2006
# stock_price = 19.99
# message = '我是：%s，成立于：%d年，股价是：%f' % (name, set_up_year, stock_price)
# print(message)

# num1 = 12
# num2 = 12.345
# print('数字12宽度限制5，结果是：%5d' % num1)
# print('数字12宽度限制1，结果是：%1d' % num1)
# print('数字12.345宽度限制7，小数精度为2，结果是：%7.2f' % num2)
# print('数字12.345宽度不限制，小数精度为2，结果是：%.2f' % num2)

# name = '传智播客'
# set_up_year = 2006
# stock_price = 19.99
# print(f'我是{name}，我成立于{set_up_year}年，我的股票价格是：{stock_price}元')

# name = input()
# print('您输入的名字是：%s' % name)

# age = input('请输入你的年龄：')
# if int(age) >= 18:
#     print('我已成年')
# else:
#     print('我未成年')

# score = input('请输入你的成绩：')
# score_int = int(score)
# if score_int >= 80:
#     print('优秀')
# elif score_int >= 60:
#     print('及格')
# else:
#     print('不及格')

# num = 10
# while num > 0:
#     print('num仍然大于0')
#     num -= 1
# print('num的值为0啦')

# name = 'zhangsan'
# for n in name:
#     print(n)

# for n in range(5):
#     print(n)
#
# print(n)
#
# for n in range(10):
#     print(n)

# for i in range(10):
#     print('i =', i)
#     for j in range(10):
#         print('j =', j)

# for i in range(10):
#     print("这里会循环10次")
#     if (i >= 5):
#         continue
#     print('这里会循环5次')

# str1 = 'itheima'
# length = 0
# for l in str1:
#     length += 1
# print('str1的长度是：', length)

# str1 = 'itheima'

# def my_len(data):
#     count = 0
#     for i in data:
#         count += 1
#     print(f'字符串{data}的长度是{count}')
#
# my_len(str1)

# num = 200

# def test_a():
#     print(f'test_a: {num}')
#
# def test_b():
#     num = 500
#     print(f'test_b: {num}')
#
# test_a()
# test_b()
# print(num)

# mylist = ['itheima', 'itcast', 'python']
# index = mylist.index('itcast')
# print(f'itcast在列表中的下标索引值是：{index}')
# index = mylist.index('hello')
# print(f'hello在列表中的下标索引值是：{index}')

# my_list = ['itcast', 'alm', 'python']
# index = 0
# while index < len(my_list):
#     element = my_list[index]
#     print('元素: ' + element)
#     index += 1

# my_list = [1, 2, 3, 4, 5]
# for ele in my_list:
#   print(f'元素：{ele}')

# my_tuple = (1, '1', 2, '2')
# print(my_tuple[2])

# stu_score = {'wanglihong':77, 'linjunjie':88}
# print(stu_score['wanglihong'])
#
# stu_score['zhoujielun'] = 66
# print(stu_score)

# f = open('D:/dev/python/python-heima-caoyu/测试.txt', 'r', encoding='utf-8')
# print(type(f))
# content = f.readline()
# print(content)
# content = f.readline()
# print(content)

# f = open('D:/dev/python/python-heima-caoyu/写入测试.txt', 'w', encoding='utf-8')
# f.write('写入测试')
# f.write('再次写入')
# f.flush()
#
# f.write('写入过后再次写入，看看之间的内容会不会被冲掉')
# f.flush()

# f.write("再次写入")
# f.close()

# import time
# print('start')
# time.sleep(1)
# print('end')

# from time import sleep
# print('start')
# sleep(1)
# print('end')

# from my_utils import str_util
# from my_utils import file_util
# print(str_util.str_reverse("我是黑马程序员"))

# import json
# data = [{"name":"张三","age":16},{"name":"李四","age":20}]
# json_str = json.dumps(data, ensure_ascii=False)
# print(type(json_str))
# print(json_str)

# 导包，导入Line功能构建折线图对象
from pyecharts.charts import Line
from pyecharts.options import TitleOpts

# 得到折线图对象
line = Line()
# 添加x轴数据
line.add_xaxis(["中国", "美国", "英国"])
# 添加y轴数据
line.add_yaxis("GDP", [30, 20, 10])
# 全局配置项
line.set_global_opts(
    title_opts=TitleOpts("GDP展示", pos_left="center", pos_bottom="1%")
)
# 生成图标
line.render()




